Skip to contentSkip to conversation

1 second freezes during new effects UT4

Bug 92806 [email protected] 1 participant 18 messages Nov 4, 2015 – Feb 14, 2017

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=92806

Bug ID: 92806
Summary: 1 second freezes during new effects UT4
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: major
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

I encountered this bug months ago but I wasn't sure if it was just UT4 or Mesa.
Before I would see 3 to 5 second freezes when a new effect was being rendered
for the first time. A new effect being a weapon firing, an impact occuring (explosions etc), or even the alternate fire on the enforcer would cause it as well even if I've use the normal fire previously. Needless to say, this made the first 2-3 minutes of any match unplayable as an enemy player would enter a room using a weapon I hadn't 'loaded' previously and I would be dead without being able to react or even fire a shot. It was a Mesa update a couple months ago that reduced the freeze time to about 1 second. It's still pretty horrible.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #2 from Michel Dänzer <[email protected]> ---
Please set the environment variable GALLIUM_HUD=num-compilations,num-shaders-created,buffer-wait-time,num-bytes-moved,requested-VRAM+VRAM-usage,requested-GTT+GTT-usage for running the game and let us know which of the graphs show spikes
corresponding to the freezes.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #3 from [email protected] ---
Num compilations showed spikes corresponding to the feezes. Sometimes it was accompanied by a spike in shader compilation, but not the majority.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #4 from [email protected] ---
As an additional note, the num compilations spikes were only 2-6 during these freezes. Also apitrace didn't show any errors during this time.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #5 from Michel Dänzer <[email protected]> ---
So it looks like the freezes are due to delayed shader compilations in the radeonsi driver (and to a lesser extent in the Mesa state tracker). Marek Olšák has been working on improving this (which is probably the main reason why it's a little better now), but it'll probably take a while until delayed shader compilations are completely eliminated.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #7 from [email protected] ---
Are num compilations the same as shader compilations? Also iirc I had the same issue on my 6950 system so it might not be radeonsi specific.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #8 from Michel Dänzer <[email protected]> ---
A num-compilations spike without a num-shaders-created spike means the shader compile was triggered by the driver, either because UT4 used the GLSL shader for the first time or because UT4 changed some OpenGL state affecting the code generated for the shader.

A num-compilations spike with a num-shaders-created spike means the shader compile was triggered by the state tracker or by UT4 itself.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #10 from Michel Dänzer <[email protected]> --- Bug reports are normally only resolved when the problem is fixed.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

famo <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
                URL|                            |https://wiki.unrealengine.c
                   |                            |om/Linux_Demos
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #11 from [email protected] ---
Update
Huge improvement with the shader cache (Great job Marek), but the issue is still present and detrimental. The first 10 seconds of the game is unplayable, and <1 second freezes (usually when in combat) still persist for the first couple of minutes after.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #12 from Marek Olšák <[email protected]> --- (In reply to bellamorte42 from comment #11)

Quoted 5 lines

Update
Huge improvement with the shader cache (Great job Marek), but the issue is still present and detrimental. The first 10 seconds of the game is unplayable, and <1 second freezes (usually when in combat) still persist for the first couple of minutes after.

Yes, that's expected. The issue can only be fixed with an on-disk shader cache. It won't help with the first run (that's unfixable), but it should help with all subsequent runs.

I guess Unreal Engine was designed with the assumption that the first run will always be unpleasant and all the rest should be fine as long as the driver isn't updated.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #13 from famo <[email protected]> --- Can someon explain when (where) the updates land?

Because I can't see any improvement here:
Kernel: 4.5.7-1-CHAKRA x86_64 (64 bit)
Graphics: Card: Advanced Micro Devices [AMD/ATI] Bonaire XTX [Radeon R7 260X] Display Server: X.Org 1.17.4
driver: radeon
GLX Renderer: Gallium 0.4 on AMD BONAIRE (DRM 2.43.0 / 4.5.7-1-CHAKRA, LLVM 3.7.0)
GLX Version: 3.0 Mesa 12.0.1

ty

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #14 from Nicolai Hähnle <[email protected]> ---
You need at least LLVM 3.8 (and Mesa re-built to link against it) to benefit from the existing shader improvements. A full shader cache is still missing

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

--- Comment #15 from Marek Olšák <[email protected]> ---
If you have OpenGL 4.3 (LLVM 3.9 needed), UE4 should no longer compile shaders on demand or not do that so often.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=92806

Timothy Arceri <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           Assignee|[email protected] |[email protected]
                   |.org                        |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel